import { tabApi } from '@/plugins/api'

const state = () => ({ list: [] })

const mutations = {
    getTagList(state, val) {
        state.list = val
    }
}

const actions = {
    async getTagList({ commit }, val) {
        // 获取标签
        const { err, data } = await tabApi.getList()
        if (err) {
            return false
        }
        commit('getTagList', data)
    }
}

export default { namespaced: true, state, mutations, actions }
